package com.sdy.healthcode.biz.service;

import com.sdy.common.model.BizException;
import com.sdy.healthcode.biz.dto.schedule.ScheduleSettings;
import com.sdy.healthcode.biz.model.ExpertsScheduleDaily;
import com.sdy.mvc.service.BaseService;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zzq
 * @since 2020-03-10
 */
public interface ExpertsScheduleDailyService extends BaseService<ExpertsScheduleDaily> {
    /**
     * 生成排班
     */
    void doDailySchedule(Date scheduleDate);

    /**
     * 增加单条排班信息
     */
    void addScheduleOrFail(Integer doctorId, List<Integer> visitMonth, String visitDayStr, List<ScheduleSettings.ScheduleSettingsDoctorVisit> visits);

    /**
     * 获取排班信息
     */
    ScheduleSettings getScheduleSettings(Integer deptId) throws BizException;

    /**
     * 保存排班信息
     */
    void saveScheduleSettings(ScheduleSettings scheduleSettings) throws BizException;

    /**
     * 医生是否已经有排班
     */
    Boolean isDoctorScheduled(Integer doctorId);

    List<ExpertsScheduleDaily> listExpertsScheduleForDay(Date dateBegin, Date dateEnd, Integer deptId, Integer doctorId);
}
